const mongoose = require('mongoose')
const Schema = mongoose.Schema
const UserSchema = new Schema({
  userName: {
    type: String,
    required: true,
    unique: true
  },
  password: {
    type: String,
    required: true
  },
  telephone: {
    type: String,
    required: true
  },
  type: {
    type: String,
    required: true,
    default: 'boss'
  },
  avatar: {
    type: String,
    default: 'https://cs-static-assets.oss-cn-beijing.aliyuncs.com/react-socket-io/tx-default.jpg'
  },
  position: {
    type: String,
    default: '暂无职位'
  },
  positionDesc: {
    type: String,
    default: '暂无职位说明'
  }
})
mongoose.model('UserSchema', UserSchema)